package com.rzx.mybackend.enums.tasks;

import com.rzx.mybackend.entity.GamePublishTask;

/**
 * GamePublishTask
 *
 * @author renzhexian
 * @date 2025/9/16
 */

public enum GamePublishTaskStatus {
    CANCELED("0", "已取消"),
    ING("1", "进行中"),
    COMPLETED("2", "已完成");

    private final String code;
    private final String message;

    GamePublishTaskStatus(String code, String message) {
        this.code = code;
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

    public static String getMessageByCodeStatus(String code) {
        for (GamePublishTaskStatus value : GamePublishTaskStatus.values()) {
            if (value.code == code) {
                return value.message;
            }
        }
        return null;
    }
}
